<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="suggest">
    <html>
      <head>
        <link rel="Stylesheet" href="Style.css" type="text/css" />
        <script type="text/javascript">
          function checksubmit()
          {
          if(document.getElementById('Text_Sender').value=='')
          {
          alert('发言人不得为空！');
          return false;
          }
          if(document.getElementById('Text_Content').value=='' || document.getElementById("Text_Content").value.replace(/\s/g, "").length>2000)
          {
          alert('内容不的为空或超出2000字符！');
          return false;
          }
          }
        </script>
      </head>
      <body>
        <!--
        This is an XSLT template file. Fill in this area with the
        XSL elements which will transform your XML to XHTML.
    -->
        <div style="width:700px;text-align:left; font-size: 9pt; ">
          <form action="project.aspx?operate=suggest" method="post" onsubmit="return checksubmit();">

            <br />
            <input id="Text_Sender" name="Text_Sender" type="text" value="匿名"  style="width:80px;" maxlength="5" />
            <br />

            <br />
            <textarea id="Text_Content" name="Text_Content" cols="20" rows="2" style="width:700px;height:60px;"></textarea>
            <br />
            <input id="Submit_" type="submit" value="提交" />
          </form>
          <xsl:for-each select="suggest">
            <div>
             
              <div style="width:100%;">
                <div style="width:350px; float:left; text-align:left;">
                  <xsl:value-of select="sender"/>
                </div>
                <div style="width:350px; float:left; text-align:right;">
                  <xsl:value-of select="time"/>
                </div>
              </div>
              <hr style="color:Gray; height:0;" />
              <div>
                <xsl:value-of select="content"/>
              </div>
            </div>
          </xsl:for-each>
        </div>
      </body>
    </html>
  </xsl:template>

</xsl:stylesheet>

